import request from '@/utils/request'
import { adminUrl } from "@/utils/baseUrl.js";

// 创建评价项目
export function createEvaluationItem(data) {
  return request({
    url: adminUrl + '/study/evaluation-item/create',
    method: 'post',
    data: data
  })
}

// 更新评价项目
export function updateEvaluationItem(data) {
  return request({
    url: adminUrl + '/study/evaluation-item/update',
    method: 'put',
    data: data
  })
}

// 删除评价项目
export function deleteEvaluationItem(id) {
  return request({
    url: adminUrl + '/study/evaluation-item/delete?id=' + id,
    method: 'delete'
  })
}

// 获得评价项目
export function getEvaluationItem(id) {
  return request({
    url: adminUrl + '/study/evaluation-item/get?id=' + id,
    method: 'get'
  })
}

// 获得评价项目分页
export function getEvaluationItemPage(query) {
  return request({
    url: adminUrl + '/study/evaluation-item/page',
    method: 'get',
    params: query
  })
}

// 导出评价项目 Excel
export function exportEvaluationItemExcel(query) {
  return request({
    url: adminUrl + '/study/evaluation-item/export-excel',
    method: 'get',
    params: query,
    responseType: 'blob'
  })
}

// 获得评价项目列表
export function getEvaluationItemsList(query) {
  return request({
    url: adminUrl + '/study/evaluation-item/list',
    method: 'get',
    params: query
  })
}
